package com.snowfeel.sfmall.core.vo;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

/**
 * @author guomenghuai
 * @date 2024/9/7
 * @Description
 */
public class Option<T> {

    /**
     * 选项的值
     */
    private T value;

    private String label;

    @JsonInclude(value = JsonInclude.Include.NON_EMPTY)
    private List<Option> children;

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<Option> getChildren() {
        return children;
    }

    public void setChildren(List<Option> children) {
        this.children = children;
    }

    public Option(T value, String label) {
        this.value = value;
        this.label = label;
    }

    public Option(T value, String label, List<Option> children) {
        this.value = value;
        this.label = label;
        this.children = children;
    }
}
